/*
 * @Author: your name
 * @Date: 2022-01-12 13:29:20
 * @LastEditTime: 2023-08-07 10:18:11
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \agricultural-production-web\src\api\statistical-report\batch-report.js
 */

import xjaxios from "@/api/axios";
// import zhreq from "@/api/axios-threeline";

import zaxios from "@/api/axios";
// import xjaxios from "@/api/axios";

export default {
  // 获取承租户列表信息
  organizationList() {
    return xjaxios.post('/v3/lessee/lessee/queryByCondition', {
      organizationNo: sessionStorage.organizationNo
    });
  },
  /**
  * @description: 获取批次名称 *代表必填
  * @param {String/Number} page *
  * @param {String/Number} size *
  */
  queryBatchList(params) {
    return zaxios.post('/v3/batch/productionBatch/queryByCondition', {
      "farmingTypeNo": sessionStorage.farmingTypeNo,
      ...params
    })
  },
  getBatchList(no) {
    return zaxios.get(`/v3/batch/productionBatch/queryByNo?no=${no}`)
  },
  // 导出
  exportExcel(params) {
    return zaxios.post('/v3/batch/productionBatch/download', params, { responseType: 'arraybuffer' })
  }
};
